package ${project.packageName}.${project.moduleName}.infrastructure.dal.assembler;

import ${project.packageName}.${project.moduleName}.domain.music.${tableStructure.classNameUppercase}Entity;
import ${project.packageName}.${project.moduleName}.domain.music.vo.${tableStructure.classNameUppercase}QueryVO;
import ${project.packageName}.${project.moduleName}.infrastructure.dal.model.${tableStructure.classNameUppercase}Model;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ${tableStructure.tableComment}装配器
 *
 * @author ${developer.author}
 * @date ${developer.datetime}
 */
@Mapper
public interface I${tableStructure.classNameUppercase}Assembler {

    /**
     * 实例
     */
    ${project.packageName}.${project.moduleName}.infrastructure.dal.assembler.I${tableStructure.classNameUppercase}Assembler IMPL = Mappers.getMapper(${project.packageName}.${project.moduleName}.infrastructure.dal.assembler.I${tableStructure.classNameUppercase}Assembler.class);

    /**
     * do 转 model
     *
     * @param entity 领域对象
     * @return ${tableStructure.classNameUppercase}Model
     */
    ${tableStructure.classNameUppercase}Model doToModel(${tableStructure.classNameUppercase}Entity entity);

    /**
     * model 转 do
     *
     * @param model model
     * @return ${tableStructure.classNameUppercase}Entity
     */
    ${tableStructure.classNameUppercase}Entity modelToDo(${tableStructure.classNameUppercase}Model model);


    /**
     * model list对象转do list对象
     *
     * @param modelList model list对象
     * @return List<${tableStructure.classNameUppercase}Entity>
     */
    List<${tableStructure.classNameUppercase}Entity> modelListToDoList(List<${tableStructure.classNameUppercase}Model> modelList);

    /**
     * model 转 vo
     *
     * @param ${tableStructure.className}QueryVO 值对象
     * @return model
     */
    ${tableStructure.classNameUppercase}Model voToModel(${tableStructure.classNameUppercase}QueryVO ${tableStructure.className}QueryVO);
}
